package club.beimeng.eduservice.controller;

import club.beimeng.commonutils.R;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin    //解决跨域问题
@RequestMapping("/eduservice/user")
public class EduLoginController {

    /*login*/
    @PostMapping("login")
    public R login(){
        return R.ok().data("token","admin");
    }

    /*info*/
    @GetMapping("info")
    public R info(){
        String avatar = "https://pic1.zhimg.com/50/v2-1455ffac90bc8ee8bc640746d7d57491_720w.webp?source=1940ef5c";
        return R.ok().data("roles","[admin]").data("name","admin").data("avatar",avatar);
    }
}
/*
 *
 * @author Mr.Bao
 * @date 2021/7/23 10:55
 */